package com.fastwire.carriere.rad.entityVo;

import java.util.Date;

import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;

import com.fastwire.carriere.rad.entity.RadAlarm;

/*
 * Creted on 20120225
 * @author: Lei Jun
 */
@Root(name = "RadAlarm")
public class RadAlarmVo
{
    @Element(required = false)
    private int port;

    @Element(required = false)
    private String alarmCode;

    @Element(required = false)
    private String severity;

    @Element(required = false)
    private String state;

    @Element(required = false)
    private String sysUpTime;

    @Element(required = false)
    private String ipAddr; // FK

    private Date lastOccurrenceDate;

    public RadAlarmVo()
    {

    }

    public RadAlarmVo(RadAlarm alm)
    {
        port = alm.getPort();
        alarmCode = alm.getAlarmCode();
        severity = alm.getSeverity();
        state = alm.getState();
        sysUpTime = alm.getSysUpTime();
        ipAddr = alm.getIpAddr();
        lastOccurrenceDate = alm.getLastOccurrenceDate();
    }

    /**
     * @return the port
     */
    public int getPort()
    {
        return port;
    }

    /**
     * @param port the port to set
     */
    public void setPort(int port)
    {
        this.port = port;
    }

    /**
     * @return the alarmCode
     */
    public String getAlarmCode()
    {
        return alarmCode;
    }

    /**
     * @param alarmCode the alarmCode to set
     */
    public void setAlarmCode(String alarmCode)
    {
        this.alarmCode = alarmCode;
    }

    /**
     * @return the severity
     */
    public String getSeverity()
    {
        return severity;
    }

    /**
     * @param severity the severity to set
     */
    public void setSeverity(String severity)
    {
        this.severity = severity;
    }

    /**
     * @return the state
     */
    public String getState()
    {
        return state;
    }

    /**
     * @param state the state to set
     */
    public void setState(String state)
    {
        this.state = state;
    }

    /**
     * @return the sysUpTime
     */
    public String getSysUpTime()
    {
        return sysUpTime;
    }

    /**
     * @param sysUpTime the sysUpTime to set
     */
    public void setSysUpTime(String sysUpTime)
    {
        this.sysUpTime = sysUpTime;
    }

    /**
     * @return the ipAddr
     */
    public String getIpAddr()
    {
        return ipAddr;
    }

    /**
     * @param ipAddr the ipAddr to set
     */
    public void setIpAddr(String ipAddr)
    {
        this.ipAddr = ipAddr;
    }

    /**
     * @return the lastOccurrenceDate
     */
    public Date getLastOccurrenceDate()
    {
        return lastOccurrenceDate;
    }

    /**
     * @param lastOccurrenceDate the lastOccurrenceDate to set
     */
    public void setLastOccurrenceDate(Date lastOccurrenceDate)
    {
        this.lastOccurrenceDate = lastOccurrenceDate;
    }
}
